package com.runen.infinitemovement.adapter;

import android.content.Context;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.module.LoadMoreModule;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.runen.infinitemovement.R;
import com.runen.infinitemovement.model.entity.HozmDetailEntity;
import com.runen.infinitemovement.tool.CommonUtil;
import com.runen.rxnetlibrary.utils.TimeUtil;

/**
 * Create by LiaoDuanHong
 * Create on 2021/01/10 17:43
 */
public class HozomDetailAdapter extends BaseQuickAdapter<HozmDetailEntity.DataBean.PageDTOBean.DetailBean, BaseViewHolder> implements LoadMoreModule {
    private Context context;

    public HozomDetailAdapter(Context context) {
        super(R.layout.item_hozom_detail_list);
        this.context = context;
    }

    @Override
    protected void convert(BaseViewHolder holder, HozmDetailEntity.DataBean.PageDTOBean.DetailBean item) {
        TextView tv_type_value = holder.getView(R.id.tv_type_value);
        TextView tv_date = holder.getView(R.id.tv_date);
        TextView tv_hozm_num_add = holder.getView(R.id.tv_hozm_num_add);
        tv_type_value.setText(item.name);
        tv_hozm_num_add.setText(item.count);
        tv_date.setText(TimeUtil.dealDateFormat(item.createTime));
    }
}
